Member since
01-27-2023
229
Posts
73
Kudos Received
45
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1334 | 02-23-2024 01:14 AM | |
| 1706 | 01-26-2024 01:31 AM | |
| 1126 | 11-22-2023 12:28 AM | |
| 2775 | 11-22-2023 12:10 AM | |
| 2859 | 11-06-2023 12:44 AM |
08-07-2023
05:26 AM
yes, you can try like that or like : format( /datetime, "yyyy/MM/dd/HH", "Asia/Jakarta") - but you will need to switch Replacement Value strategy, from Literal Value to Record Path Value.
... View more
08-07-2023
01:04 AM
1 Kudo
@Galih, as far as I know, your date will be converted to GMT per default. You could try using an UpdateRecord instead of an ConvertRecord and add a property name "/YOUR_DATE_COLUMN_NAME", having the value: format( /YOUR_DATE_COLUMN_NAME, "yyyy/MM/dd/HH", "THE_TIMEZONE_YOU_ARE_IN"). This is what I am using right now to avoid this exact behavior, especially when working with different formats (JSON to AVRO, AVRO to CSV, etc)
... View more
08-01-2023
06:47 AM
1 Kudo
@MWM, What I would try is the following: - Once you extracted your CSV File, I would split that CSV File into smaller chunks (1Record per FlowFile) using SplitRecord. I would write the output in JSON Format to further help you in your use case. - Having 1 record per flow file and in JSON Format, I would go ahead and use EvaluateJsonPath, to extract the values from within the FlowFile and save them as attributes in my FlowFile. - Next, I would call your API using InvokeHTTP, as you are already doing. - The output of the InvokeHTTP will be a JSON, containing the response. From here, as you have the file as JSON, you can use use another EvaluateJsonPath and extract the newly added content as attributes to your FlowFile, while keeping the old attributes as well. - With the new data extracted as attributes, I would add an AttributesToJson Processor and build my new data using all the extracted attributes.
... View more
07-31-2023
11:59 PM
1 Kudo
@MihaiMaranduca, In addition to what @SAMSAL already said, I would add the followings: - the NiFi processors WORK and DO NOT work as triggers. Let's remember that the triggers (in any sql database) are basically some database objects, whereas NiFi is a standalone application, connected to that Database. Using the Maximum-value Columns you will somehow mimic the trigger like functionality but in the end, NiFi will only execute an SQL Statement on your database, based on the column you have defined in the mentioned property. When it comes to performance optimization, I would personally recommend you the following: - Within QueryDatabaseTable, define the scheduling as per your requirements. If you know that your data gets loaded once per day, switch to an once per day execution .... if you need hourly, get an hourly execution and so on. - Within your DBCPConnectionPool, pay attention to the following properties, as they are pretty important: a) Time Between Eviction Runs = if you leave it default, most likely (depending on how the DB was configured as well) you will never close your sessions, eventually causing problems. Here you can set any value in millis, which will tell NiFi to drop the connection after that time has passed. For example, I am using 1440000 millis. b) Max Idle Connections = The maximum number of connection that can remain idle without extra ones being released. I personally am working with a lower value than the one default. c) Minimum Evictable Idle Time = The minimum time a connection may sit idle in the pool, before being marked for release. Here the value is 30 mins default but I am using 10 mins mostly, especially for the queries which have to be executed every 15mins.
... View more
07-30-2023
11:30 PM
as far as I can tell from your error message, your problem is related to your security certificates. I am no expert here, but maybe you can await for a response from @steven-matison. While you do that, I strongly recommend you to go through the following two links, as they are eye-opening when it comes to working with certificates: https://community.cloudera.com/t5/Community-Articles/NIFI-SSL-in-Modern-Versions-of-NiFi/ta-p/371937 https://community.cloudera.com/t5/Support-Questions/Configure-StandardSSLContextService-for-Elasticsearch/m-p/302719
... View more
07-27-2023
03:02 AM
@Sivaluxanif I am not mistaken, you need to download the JDBC of the database you are using in azure cosmos db. I am no expert in Azure, but as far as I know you have NoSQL, MongoDb, Cassandra, Gremlin and PostgreSQL. You first need to identify the DB you are connecting to, download the JDBC to that specific database and proceed next from there.
... View more
07-26-2023
04:21 AM
@Sivaluxan, You need to connect to Azure Cosmos DB and extract data from there? If so, you can use an ExecuteSQLRecord processor and configure the DBCPConnectionPool to connect to your AzureCosmosDB, using the appropriate Class Path, the appropriate JDBC and the appropriate security (keys, users, password, whatever you are using)
... View more
07-26-2023
03:28 AM
@Luwi, Set you processor on Debug and see if any new lines get written. Are you certain that the port is correct and you have a firewall access from NiFi to that stmp server via that port? Besides that, are you certain that SMTP STARTTLS should be on true? I am using it on false and had not issue with it. In addition to this, try sending an text/plain email from a generateFlowFile processor to test the functionality. Maybe it has something to do with generating the html layout for your email
... View more
07-12-2023
03:46 AM
the question is how? 😀 I just tested again and I was able to extract data from (and into) BigQuery without any errors. It seems that something you have defined is not 100% correct. Circling back to my initial post, you would need those defined as: Database Connection URL: jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=your-project-if-here;OAuthType=0;OAuthServiceAcctEmail=your-email-for-service-account-here;OAuthPvtKeyPath=path_on_nifi_server_where_the_service_account_json_is_located; Database Driver Class Name: com.simba.googlebigquery.jdbc.Driver Database Driver Location: full_path_to_jars_location/ Where the Database driver location has to be the full path to the folder where you have extracted the JDBC (not ODBC) ZIP File... and you only have to point to the folder, not to a specific JAR file. In addition, pay attention to how the connection URL is configured and make sure that you follow the same structure. Plus, make sure that your SA has all the necessary rights for your actions.
... View more
07-12-2023
12:19 AM
@MWM, If you want to read line by line (record by record), you should use SplitRecord to split the CSV record by record and send them further into processing. You will define and RecordReader - CSV in your case and a RecordWriter - JSON. Next, using EvaluateJsonPath, you can extract the content of each FlowFile and add them as attributes. Lastly, you can send those attributes to create the rest query. But please take note that if you are working with CSVs containing far too many lines, you will have some performance issues and you might want to rethink your option. PS: there are other options to perform the task so you can wait for other responses and choose the best one for you 🙂
... View more